package com.bishe.psy.dao;

import com.bishe.psy.model.Article;
import org.apache.catalina.LifecycleState;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ArticleMapper {
    int insert(Article row);

    int insertSelective(Article row);

    Article selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Article row);

    int updateByPrimaryKeyWithBLOBs(Article row);

    int updateByPrimaryKey(Article row);

    //心灵天地页面咨询师信息和文章信息
    List<Article> selectAll();

    //查询在位的咨询师信息
    List<Article> selectConByIsReign();

    //根据文章id查寻某一篇文章具体信息
    Article selectArticleById(@Param("id") Long id);

    //根据id查询某位在位的咨询师的具体信息
    Article selectConById(@Param("id") Long id);

    //根据用户id查询发布的文章
    List<Article> selectByUserId(Long userId);

}